package com.xmg.shop.api.domain;

import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

/**
 * Created by KavenC on 2017/11/15.
 */
@Getter
@Setter
public class SkuProperty implements Serializable {
    public static final int INPUT_TYPE = 0;         //输入框方式
    public static final int SELECT_TYPE = 1;        //多选框方式
    public static final int PULL_DOWN_TYPE = 2;     //下拉列表方式

    private Long id;
    private String name;
    private Long catalogId;
    private int type;
    private Integer sequence;

    public String getPropertyType() {
        String propertyType = "输入框";
        switch (this.type) {
            case SkuProperty.INPUT_TYPE:
                propertyType = "输入框";
                break;
            case SkuProperty.SELECT_TYPE:
                propertyType = "复选框";
                break;
            case SkuProperty.PULL_DOWN_TYPE:
                propertyType = "下拉列表";
                break;
            default:
                propertyType = "输入框";
                break;
        }
        return propertyType;
    }
}
